using System;
using System.Globalization;
using System.Windows.Data;

namespace vlcplay.Converters
{
    public class BoolToHeightConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isMaximized = (bool)value;
            return isMaximized ? double.NaN : System.Convert.ToDouble(parameter ?? 400);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}